Skip to content

databricks-cli: switch to replit/databricks-cli fork#482

Draft
luketchang wants to merge 1 commit intomainfrom
luketchang/databricks-cli-replit-fork
Draft

databricks-cli: switch to replit/databricks-cli fork#482
luketchang wants to merge 1 commit intomainfrom
luketchang/databricks-cli-replit-fork

Conversation

@luketchang
Copy link
Copy Markdown
Contributor

@luketchang luketchang commented May 7, 2026

Why

Pid2's databricks.ts invokes databricks sync to upload Repl files to a Databricks Apps workspace. We've been hitting 502s mid-sync that surface as fatal errors because the upstream SDK's retry predicate covers 429/504 but not 502/503. We also want the option to dial in-flight upload concurrency.

The fork at replit/databricks-cli adds two flags to databricks sync (and databricks bundle sync):

  • --retry-timeout (default 30s) — per-call deadline for retrying transient gateway errors (HTTP 502/503/504), implemented with the SDK's retries.Poll.
  • --concurrency (default 5) — replaces the hardcoded 20 in-flight request limit.

Fork branch: https://github.com/replit/databricks-cli/tree/replit-main
Upstream PR (merged): replit/databricks-cli#1
Slack thread: https://replit.slack.com/archives/C0A2Z9042FR/p1778082184841149

What changed

  • Repoint src from databricks/cli v0.286.0 → replit/databricks-cli replit-main at commit 4928653c. The branch is upstream v0.290.2 + the 1 Replit commit. Version string is 0.290.2-replit-4928653c.
  • Update source hash and vendorHash. Vendor hash is identical to nixpkgs' v0.290.2 entry (the Replit commit doesn't add new Go dependencies).
  • Update meta.homepage to the fork; keep meta.changelog pointing at upstream tags.
  • Pin to v0.290.2 (the same release nixpkgs is on at https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/da/databricks-cli/package.nix) so the checkFlags skip list stays identical to nixpkgs', mirroring established practice. v0.291+ adds an SDK host-metadata resolver that's awkward to test in the nix sandbox; bumping past it is a separate change.

Test plan

$ nix build '.#activeModules.databricks-cli' '.#activeDeploymentModules.databricks-cli'
# both targets build clean, including the upstream test phase

$ databricks --version
Databricks CLI v0.290.2-replit-4928653c

$ databricks sync --help | grep -E "concurrency|retry-timeout"
      --concurrency int          maximum number of concurrent in-flight requests during sync (default 5)
      --retry-timeout duration   per-call deadline for retrying transient gateway errors (HTTP 502/503/504) (default 30s)

135 test packages run in the nix sandbox during nix build, including libs/sync (covers the new retry helper) and cmd/sync (covers the new flags). 0 failures. The checkFlags skip list is unchanged from the original PR (#477) and mirrors nixpkgs upstream.

Rollout

  • This is fully backward and forward compatible

The new flags have sane defaults, so existing callers (pid2's databricks sync ... invocation) get the new retry behaviour and concurrency=5 automatically without any pid2 change. To revert, change the pin back to upstream databricks/cli v0.286.0 with the original hashes.

Revertibility

Safe to revert. Pure module pin change with no migrations or persistent state.

~ written by Zerg 👾 (wp-7918444a)

@luketchang luketchang added the zergling-authored Authored by Zerg agent label May 7, 2026
@luketchang luketchang force-pushed the luketchang/databricks-cli-replit-fork branch from cdeb15b to e1bd3c7 Compare May 7, 2026 07:06
Point the databricks-cli module at the Replit fork at
github.com/replit/databricks-cli, branch replit-main (commit
4928653c). The fork tracks upstream v0.290.2 + 1 Replit commit, which
adds --concurrency and --retry-timeout flags to `databricks sync` to
mitigate 502s and let us tune in-flight request count when deploying
Apps from pid2.

Pinning to v0.290.2 (the same release nixpkgs is on) keeps the test
skip list identical to nixpkgs upstream's, so the build matches
established practice. Bumping past v0.291.0 in a future PR will
require adding skip entries for the new SDK host-metadata resolver
tests; that's a separate change.

Slack thread:
https://replit.slack.com/archives/C0A2Z9042FR/p1778082184841149

~ written by Zerg 👾 ([wp-7918444a](https://zerg.zergrush.dev/chat?id=wp-7918444a))
@luketchang luketchang force-pushed the luketchang/databricks-cli-replit-fork branch from e1bd3c7 to 6b2b35a Compare May 7, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

zergling-authored Authored by Zerg agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant